package utils
{
	public class ColorUtil
	{
		public function ColorUtil()
		{
		}
		
		public static function toHexColor(color:Number):String {
			if (color < 0 || isNaN(color)) return null;
			var str:String = color.toString(16);
			while (str.length < 6) str = "0" + str;
			return "#" + str;
		}
		public static function colToStr(color:String):String
		{
			var str:String = color;
			if(str.indexOf("#") == -1){
				str = "#" + str;
			}
			while(str.length < 7){
				str += "0";
			}
			return str;
		}
	}
}